 <!DOCTYPE html>
 
<%@ page import="java.sql.*" %> 
<%@ page import="java.io.*" %> 
<%@ page import="java.util.Date" %> 
<%@ page import="java.text.DateFormat" %> 
<%@ page import="java.text.SimpleDateFormat" %> 


<% 
try {
	
	String connectionURL = "jdbc:mysql://localhost:3306/unilearn"; 
	
	int c_row_count = 0;
	Connection connection = null;
	Statement stmt = null;
	ResultSet rst=null;

	Class.forName("com.mysql.jdbc.Driver").newInstance(); 

	connection = DriverManager.getConnection(connectionURL, "root", "");
	stmt = connection.createStatement();
	
	if(!connection.isClosed())
	{
		
		
		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Date _now = new Date();
		
		
		//String full_s_date = "";
		//String full_e_date = "";
		//if (s_dd != "" && s_mm != "" && s_yy != "")
		//{
		//	 full_s_date = s_yy + "-" + s_mm + "-" + s_dd + " 00:00:00";
		//}
		
		//if (e_dd != "" && e_mm != "" && e_yy != "")
		//{
		//	full_e_date = e_yy + "-" + e_mm + "-" + e_dd + " 00:00:00";
		//}
		
		//get session values
		String user_id = (String)session.getAttribute("UserID");
		String permission = (String)session.getAttribute("Permission");
		String first_name = (String)session.getAttribute("LastName");
		String last_name = (String)session.getAttribute("FirstName");
		String class_group_id = (String)session.getAttribute("ClassGroupID");
		
	
%>

<html lang="en">
<head>
<script type="text/javascript">
	
</script>
<link rel="stylesheet" type="text/css" href="common.css">
<title>UniLearn System</title>
</head>
<body>
<form action="assignmentCreate.jsp" method="post" name="entry" onSubmit="return validate(this)">
<table class="TblBody" style="width:750px">
	<tr>
		<td>
			<div class="contentb">
				<table width="100%">
                    <tr>
                        <td style="background-color:#ccff99; font-size:20px; font-weight:bold; height:30px">Main</td>
                    </tr>
					<tr>
						<td style=" font-size:15px; font-weight:bold">
							<table width="100%">
							    <tr>
									<% 
										int int_permission = Integer.parseInt(permission);
										
										if (int_permission > 5) {
									%>		
							        <td style="width:8%"><a href="assignmentCreate.jsp">Assigment</a></td>
							        <td style="width:3%">&nbsp;/&nbsp;</td>
							        <td style="width:12%"><a href="administrator.html">Discuss Barod</a></td>
							        <td style="width:3%">&nbsp;/&nbsp;</td>
							        <td style="width:13%"><a href="personalSetting.html">Personal Setting</a></td>
							        <td style="width:40%"></td>
									<%
										}else{
									%>
									<td style="width:8%"><a href="assignment_submition.jsp">Assigment</a></td>
							        <td style="width:3%">&nbsp;/&nbsp;</td>
							        <td style="width:12%"><a href="administrator.html">Discuss Barod</a></td>
							        <td style="width:3%">&nbsp;/&nbsp;</td>
							        <td style="width:13%"><a href="personalSetting.html">Personal Setting</a></td>
							        <td style="width:40%"></td>
									<%
										}
									%>
							        <td style="color:#666666; font-size:11px">Hello! <span><u><%=first_name%>&nbsp;<%=last_name%></u></span></td>
							    </tr>
							</table>
							<hr />
						</td>
					</tr>
					<tr>
                        <td>
							<table border="0.2">
							<tr>
								<td><input type="file" name="file" size="20" maxlength="20" /></td>
							</tr>
							<%
								String assignment_id = request.getParameter("assignment_id");
							%>
							</table>
                        </td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</table>
</form>
<%
}
	}catch(Exception ex){

		out.println(ex);
	}
%>
</body>
</html>